import request from "../index"


//用户登录
export const loginApi = (params)=>{
    // console.log(params,"para")
    return request.post("/user/login",params)
}

//用户注册

export const registerApi = (params)=>{

    // console.log(params,"用户注册信息")
    return request.post("/user/register",params)
}

//获取所有用户信息

export const getAddUserInfo = ()=>{
    return request.get("/user/alldata")
}

//删除商家

export const deleteuserInfoApi = (params)=>{
    return request.post("/user/deleteUser",params)
}


//设置商家的店铺信息
export const setUserStoreInfoApi = (params)=>{
    return request.post("/user/shopInfo",params)
}

//获取所有商家店铺信息

export const getAllShopDataApi = ()=>{
    return request.post("/user/allShopData")
}

// 添加商品的分类API

export const submitCategoryApi = (data)=>{
    return request.post("/goods/category1",data)
}


// 获取商品分类一的数据
export const getcategory1DataApi = (data)=>{
    return request.post("/goods/category1Data",data)
}


// 删除商品分类一的数据
export const deletecategory1DataApi = (data)=>{
    return request.post("/goods/deleteCategory1Data",data)
}

//获取商品分类一的数据

export const updatacategory1DataApi = (data)=>{
    return request.post("/goods/updataCategory1Data",data)
}


//添加商品的接口

export const addGoodsDataApi = (data)=>{
    return request.post("/goods/addGoodsData",data)
}

// 获取商品接口


export const getGoodsDataApi = (data)=>{
    return request.post("/goods/getGoodsData",data)
}

// 删除商品的数据
export const deletecategory2DataApi = (data)=>{
    return request.post("/goods/deleteCategory2Data",data)
}


// 商家获取订单数据

// 删除商品的数据
export const getOrdersByShopAddressIdApi = (data)=>{
    return request.post("/goods/getOrdersByShopAddressId",data)
}


// 删除商品的数据
export const modifyShopOrderApi = (data)=>{
    return request.post("/goods/modifyShopOrder",data)
}


